<seed-content #container [ngClass]="{'info-wrap': tabStore.currentTabTitle == '详情'}">
  <seed-toolbar-header>
    <seed-toolbar-title>赛事详情</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <seed-infinite-scroll (infiniteScroll)="handleScrollLoad(tabStore.currentTabTitle)">
    <div class="competition-detail">
      <header *ngIf="competitionBasicInfo">
        <h2 class="title">{{competitionBasicInfo.matchName|truncate:10}}
          <seed-badge-label *ngIf="competitionBasicInfo.isTeam===1">俱乐部</seed-badge-label>
        </h2>
        <div class="basic-info">
          <div class="basic-header">
            <div class="user-info" (click)="goToPosterPage()">
              <seed-avatar [lazyLoadAvatar]="competitionBasicInfo.iconUrl"></seed-avatar>
              <div class="info-text">
                <span>{{competitionBasicInfo.nickName|truncate:8}}</span>
                <time>{{competitionBasicInfo.createTime|date:"yyyy/M/d"}}&nbsp;发布</time>
              </div>
            </div>
          </div>
          <ul class="basic-content">
            <li>赛事时间：{{competitionBasicInfo.createTime |date:"yyyy年M月d日"}}~{{competitionBasicInfo.endTime
              |date:"yyyy年M月d日"}}
            </li>
            <li>
              报名时间：{{competitionBasicInfo.signStartTime|date:"yyyy年M月d日"}}~{{competitionBasicInfo.signEndTime|date:"yyyy年M月d日"}}
            </li>
            <li *ngIf="competitionBasicInfo.sponsorsList.length>0">
              <em>主办方：</em>
              <p>
                <span *ngFor="let sponsor of competitionBasicInfo.sponsorsList;let i=index">{{sponsor}}
                 <i *ngIf="i!==competitionBasicInfo.sponsorsList.length-1">、</i>
                </span>
              </p>
            </li>
            <li *ngIf="competitionBasicInfo.corganizersList.length>0">
              <em>协办方：</em>
              <p>
                <span *ngFor="let coOrganizer of competitionBasicInfo.corganizersList;let i=index">{{coOrganizer}}
                      <i *ngIf="i!==competitionBasicInfo.corganizersList.length-1">、</i>
                   </span>
              </p>
            </li>
            <li *ngIf="competitionBasicInfo.organizersList.length>0">
              <em>承办方：</em>
              <p>
                <span *ngFor="let organizer of competitionBasicInfo.organizersList;let i=index">{{organizer}}
                    <i *ngIf="i!==competitionBasicInfo.organizersList.length-1">、</i>
                  </span>
              </p>
            </li>
          </ul>
        </div>
      </header>
      <nav #tab *ngIf="competitionBasicInfo">
        <seed-tab (tabSelect)="getTabIndex($event)">
          <seed-tab-item [title]="'详情'">
            <match-description [matchId]="dataStore.matchId"></match-description>
          </seed-tab-item>
          <seed-tab-item [title]="'章程'">
            <match-rules [matchId]="dataStore.matchId"></match-rules>
          </seed-tab-item>
          <seed-tab-item [title]="'赛程'" *ngIf="tabStore.isMatch">
            <match-schedule [matchId]="dataStore.matchId" (scrollComplete)="scrollComplete()"
                               (disabledScroll)="disabledScroll($event)"></match-schedule>
          </seed-tab-item>
          <seed-tab-item [title]="'排名'" *ngIf="tabStore.isRanking">
            <match-ranking [matchId]="dataStore.matchId" (scrollComplete)="scrollComplete()"
                                 (disabledScroll)="disabledScroll($event)"
                                 (enabledScroll)="enabledScroll($event)"></match-ranking>
          </seed-tab-item>
          <seed-tab-item [title]="'公告'">
            <match-notice [matchId]="dataStore.matchId" (scrollComplete)="scrollComplete()"
                                (disabledScroll)="disabledScroll($event)"></match-notice>
          </seed-tab-item>
        </seed-tab>
      </nav>
    </div>
    <seed-infinite-scroll-content
      *ngIf="tabStore.noDataTabArr.indexOf(tabStore.currentTabTitle)===-1"></seed-infinite-scroll-content>
  </seed-infinite-scroll>
  <div class="event-detail-position" *ngIf="competitionBasicInfo && tabStore.currentTabTitle == '详情'">
    <div
      class="event-apply"
      [class.event-pre]="competitionBasicInfo?.status=='3'"
      [class.event-ing]="competitionBasicInfo?.status=='4'"
      [class.event-end]="competitionBasicInfo?.status=='5'||competitionBasicInfo?.status=='7'||competitionBasicInfo?.status=='8'"
      [class.event-playing]="competitionBasicInfo?.status=='6'"
      (click)="goToGoodsDetailPagep()"
    >
      {{competitionBasicInfo?.status=='3'?'预热中':competitionBasicInfo?.status=='4'?'我要报名':competitionBasicInfo?.status=='5'?'已报满':competitionBasicInfo?.status=='6'?'进行中':competitionBasicInfo?.status=='7'||competitionBasicInfo?.status=='8'?'已结束':''}}
    </div>
  </div>
</seed-content>
<div class="match-people" routerLink="/match/additional" [queryParams]="{matchId:dataStore.matchId}" *ngIf="pageDate.isManager"></div>

